package com.sskj.finance.bean;

import com.sskj.lib.util.CoinUtil;
import com.sskj.lib.util.TimeFormatUtil;

import java.util.Date;

public class TransferRecordBean {

    /**
     * pid : 3
     * ptype : ETH
     * price : -10.00000000
     * memo : 从理财账户划转到交易账户
     * addtime : 1557489540
     */

    private String pid;
    private String ptype;
    private String price;
    private String memo;
    private String addtime;

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPtype() {
        return ptype;
    }

    public void setPtype(String ptype) {
        this.ptype = ptype;
    }

    public String getPrice() {
        return CoinUtil.keepCoinNumMax(ptype, price);
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getAddtime() {
        return TimeFormatUtil.SF_FORMAT_E.format(new Date(Long.valueOf(addtime) * 1000));
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }
}
